home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 5730 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.9 KB

  1. Path: sdcc12.ucsd.edu!golgi!jstrout
  2. From: Joseph Strout <jstrout@ucsd.edu>
  3. Newsgroups: comp.lang.c++
  4. Subject: String Class in native Mac format (ANNOUNCEMENT)
  5. Date: Tue, 6 Feb 1996 08:01:51 -0800
  6. Organization: University of California, San Diego
  7. Message-ID: <Pine.SGI.3.91.960206075520.12266D-100000@golgi>
  8. NNTP-Posting-Host: golgi.ucsd.edu
  9. Mime-Version: 1.0
  10. Content-Type: TEXT/PLAIN; charset=US-ASCII
  11. X-Sender: jstrout@golgi
  12.  
  13. I have a String class whose internal data format is a Str255 
  14. (255-character Pascal string), the format used by the Macintosh Toolbox.  
  15. This means that you can pass my String directly to any Toolbox routine 
  16. which expects a string, either for reading OR writing.
  17.  
  18. This solves what is generally a major headache when using the Toolbox 
  19. from C/C++, i.e. conversion of various string formats.
  20.  
  21. The class supports all the standard operators ( +, [], ==, etc.) plus a 
  22. number of other handy operators and functions, such as * (repeat), 
  23. Element (gets a specified element, separated by a delimiter), Uppercase 
  24. (obvious), and Plural (pluralizes most English words correctly).
  25.  
  26. Although the internal format is especially handy on the Mac, I use the
  27. same class (without modification) on other platforms (including Unix/g++
  28. and DOS/Borland C++).  The Mac-specific code (mainly the conversion
  29. to/from Str255) is separated from the generic code in "#ifdef macintosh"
  30. blocks.
  31.  
  32. The code and documentation are available via the WWW at:
  33.     http://www-ncmir.ucsd.edu/~jstrout/classlib/
  34.  
  35. The class may be used in any product, free of charge -- just slip my name 
  36. into the credits somewhere, and kindly tell me about it.
  37.  
  38. ,------------------------------------------------------------------.
  39. |    Joseph J. Strout           Department of Neuroscience, UCSD   |
  40. |    jstrout@ucsd.edu           http://www-acs.ucsd.edu/~jstrout/  |
  41. `------------------------------------------------------------------'
  42.  
  43.